<template>
	<view class="">
		<!-- <cover-view class="controls-title">简单的自定义 controls</cover-view> -->

		<web-view :src="url">


		</web-view>
		<view class="custom-button">
			<image @click.stop="goHome" src="@/static/index/icon_ckgd.png" mode="widthFix"></image>
			
			<!-- <movable-area>
				<movable-view :x="old.x" :y="old.y" direction="all" @change="onChange">text</movable-view>
			</movable-area> -->


		</view>

		<!-- <button class="custom-button">自定义按钮</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				x: 0,
				y: 0,
				old: {
					x: 0,
					y: 0
				},
				url: ''
			}
		},
		onShow() {
			let data = {
				name: 'webview页',
				age: "23"
			}
			this.$ymmd(data)
		},
		onLoad(e) {
			if (e.url) {
				// console.log("https://xindai.duxiaoman.com/cloan/operation/activity",'酷酷酷')
				// console.log(e.url,'e.url')
				this.url = e.url
			}
			// console.log(e,'是')
		},
		methods: {
			goHome(){
				this.$ymmdBtn("goBack",{
					name:'返回的'
					// id:item.id
				})
				uni.redirectTo({
					url:"/pagesC/list/index"
				})
				// console.log("返回上一个")
				// uni.navigateBack()
			},
			onChange(e) {
				this.old.x = e.detail.x
				this.old.y = e.detail.y
			}
		},


	}
</script>

<style lang="scss" scoped>
	.custom-button {
		
		position: absolute;
		bottom: 10%;
		/* 或者 top: 20px; 根据需要调整 */
		right: 0;
		// transform: translateX(-50%);
		z-index: 100;
		image{
			width: 200rpx;
			height: 110rpx;
		}
		/* 确保按钮在webview之上 */
	}
</style>